package com.aspose.cells.a.d.a.a;

import java.awt.Color;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.io.IOException;

public class zcs extends com.aspose.cells.a.d.a.zg {
   private Rectangle b;
   private int c;
   private int d;
   private int e;
   private int f;
   private int g;
   private int h;
   private int i;
   private int j;
   private int k;
   private int l;
   private Color m;
   private BufferedImage n;

   public zcs() {
      super(81, 1);
   }

   public zcs(Rectangle var1, int var2, int var3, int var4, int var5, BufferedImage var6, Color var7) {
      this();
      this.b = var1;
      this.c = var2;
      this.d = var3;
      this.e = var4;
      this.f = var5;
      this.g = 0;
      this.h = 0;
      this.i = var6.getWidth();
      this.j = var6.getHeight();
      this.k = 0;
      this.l = 13369376;
      this.m = var7;
      this.n = var6;
   }

   public void a(int var1, com.aspose.cells.a.d.a.zb var2) throws IOException {
      var2.a(this.b);
      var2.f(this.c);
      var2.f(this.d);
      var2.f(this.g);
      var2.f(this.h);
      var2.f(this.i);
      var2.f(this.j);
      var2.b(80);
      var2.b(40);
      var2.b(120);
      ColorModel var3 = this.n.getColorModel();
      boolean var4 = var3.hasAlpha();
      byte var5 = 4;
      String var6 = "*BGR";
      byte var7 = 24;
      if (var4) {
         var6 = "*BGRA";
         var5 = 1;
         var7 = 32;
      }

      byte[] var8 = com.aspose.cells.a.d.b.zb.a(this.n, this.m, var6, var5);
      var2.b(var8.length);
      var2.b(this.k);
      var2.b(this.l);
      var2.f(this.e);
      var2.f(this.f);
      byte var9 = 0;
      zn var10 = new zn(this.n.getWidth(), this.n.getHeight(), var7, var9, var8.length, 0, 0, 0, 0);
      var2.write(var10.a());
      var2.write(var8);
   }
}
